using System;

namespace GeneticAlgorithms.ComponentModel
{
    /// <summary>
    /// Allows developers to provide a user-friendly name
    /// for a class.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public sealed class FriendlyNameAttribute : Attribute
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="FriendlyNameAttribute"/> class.
        /// </summary>
        /// <param name="friendlyName">Name of the friendly.</param>
        public FriendlyNameAttribute(string friendlyName)
        {
            this.friendlyName = friendlyName;
        }

        private readonly string friendlyName;

        /// <summary>
        /// Gets the name of the friendly name for a class.
        /// </summary>
        /// <value>The friendly name of a given class.</value>
        public string FriendlyName
        {
            get { return friendlyName; }
        }
    }
}
